#ifndef __MOVABLE__MOVER__HH__
#define __MOVABLE__MOVER__HH__

#include <LitPrerequisites.h>
#include <LitMovable.h>
#include <LitExceptions.h>

#include "UserSceneQuery.h"
#include "RenderViewport.h"

class MovablePlacer
{
	bool						mPlacingMode;
	Lit::PlaneAxis				mMovePlane;
	RenderViewportPtr			mViewport;
public:
	MovablePlacer( RenderViewportPtr vp ) ;
	~MovablePlacer();
	
	Lit::PlaneAxis movingPlane() const;
	void setMovePlane( Lit::PlaneAxis plane );

	bool isPlacing() const;
	void setPlacingMode( bool state );
	
	void update( );
	Ogre::Real distanceFromPlane( const Ogre::Vector3& p, Lit::PlaneAxis plane );
	void updatePlace( Ogre::Ray user_ray, Lit::PlaneAxis axis = Lit::PLANE_XZ, Ogre::Real distance = 0 );
	Ogre::Vector3 getMovablePlace( Ogre::Ray ray, Lit::PlaneAxis axis, Ogre::Real distance = 0 );
};
#endif